A hat trick is three scores in a row or in the same game. It's most commonly used in hockey for when a player gets three goals in a single game.
This term originally applied to the retiring of three batsmen with three consecutive balls by a bowler in cricket. This achievement was rewarded with a hat, thus the name. From there, it spread to other sports, especially hockey, where a hat trick means one player has scored three goals in a game. The word is also used loosely for any accomplishment that has three parts. An actor who wins three Oscars has scored a hat trick of sorts.